<%@page import="cn.edu.ujn.finalwork.dao.Customer"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改客户信息</title>
  <style>
             .content{
                background-color: antiquewhite;
                border: 1px solid black;
                box-shadow: 2px 2px 2px 2px rgb(138, 136, 165);
                padding: 10px;
                margin: 0 auto;
                position: relative;
                width:400px;
            }
        </style>
</head>
<body>
<% Customer cus=(Customer)session.getAttribute("cuss");
List<String> u1=(List<String>)session.getAttribute("u1");
List<String> c1=(List<String>)session.getAttribute("c1");
List<String> s1=(List<String>)session.getAttribute("s1");
List<String> i1=(List<String>)session.getAttribute("i1");
List<String> l1=(List<String>)session.getAttribute("l1");
List<String> u2=(List<String>)session.getAttribute("u2");
List<String> c2=(List<String>)session.getAttribute("c2");
List<String> s2=(List<String>)session.getAttribute("s2");
List<String> i2=(List<String>)session.getAttribute("i2");
List<String> l2=(List<String>)session.getAttribute("l2");
int i=0;
%>
<div class="content">
<form action="updateOneCustomer" method="post">

客户名称：<input type="text" name="cust_name" value=<%=cus.getCustName() %>><br>
负责人：
<select name="cust_user_id">
<%for(String u:u2) {
    
   if(u.equals(cus.getCustUserId()+"")){
   %>
<option value=<%=u %> selected="selected"><%=u1.get(i) %></option>
<%i++;}else{ %>
<option value=<%=u %> ><%=u1.get(i) %></option>
<%i++;} }i=0;%>
</select>
<br>
创建人：
<select name="cust_create_id">
<%for(String u:c2) {
    
   if(u.equals(cus.getCustCreateId()+"")){
   %>
<option value=<%=u %> selected="selected"><%=c1.get(i) %></option>
<%i++;}else{ %>
<option value=<%=u %> ><%=c1.get(i) %></option>
<%i++;} }i=0;%>
</select>
<br>
客户信息来源：
<select name="cust_sourse">
<%for(String u:s2) {
    
   if(u.equals(cus.getCustSource())){
   %>
<option value=<%=u %> selected="selected"><%=s1.get(i) %></option>
<%i++;}else{ %>
<option value=<%=u %> ><%=s1.get(i) %></option>
<%i++;} }i=0;%>
</select><br>
客户所属行业：
<select name="cust_industry">
<%for(String u:i2) {
    
   if(u.equals(cus.getCustIndustry())){
   %>
<option value=<%=u %> selected="selected"><%=i1.get(i) %></option>
<%i++;}else{ %>
<option value=<%=u %> ><%=i1.get(i) %></option>
<%i++;}} i=0;%>
</select><br>
客户级别：
<select name="cust_level">
<%for(String u:l2) {
    
   if(u.equals(cus.getCustLevel())){
   %>
<option value=<%=u %> selected="selected"><%=l1.get(i) %></option>
<%i++;}else{ %>
<option value=<%=u %> ><%=l1.get(i) %></option>
<%i++;} }i=0;%>
</select><br>
联系人：<input type="text" name="cust_linkman" value=<%=cus.getCustLinkman() %>><br>
固定电话：<input type="text" name="cust_phone" value=<%=cus.getCustPhone() %>><br>
移动电话：<input type="text" name="cust_moblie" value=<%=cus.getCustMoblie() %>><br>
邮政编码：<input type="text" name="cust_zipcode" value=<%=cus.getCustZipcode() %>><br>
联系地址：<input type="text" name="cust_address" value=<%=cus.getCustCreatetime() %>><br>
<input type="submit" value="提交修改"/><br>
 <a href="goback">返回管理页面 </a>

</div>




</form>

</body>
</html>